package com.zjitc.config;

import com.zjitc.obj.Teacher;
import com.zjitc.obj.User;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.Scope;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/3/6 16:47
 * @description:
 */
@Configuration
@Import(JavaConfigDemo1.class)
public class JavaConfigDemo2 {
  @Bean
  @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
  public Teacher teacher(User user){
    return new Teacher(user);
  }
}
